package cn.edu.ctbu.demo1.repository;

import cn.edu.ctbu.demo1.domain.Student;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

public interface StudentRepository extends JpaRepository <Student,Integer>{
   /**
    * 按名字查询
    * @param name
    * @return
    */
   List<Student> findByNameLike(String name);

   /**
    * 按姓名和班级名称查询
    * @param name
    * @param classname
    * @return
    */
   List<Student> findByNameLikeAndClassname(String name, String classname);

   List<Student> findByNameLikeAndPassword(String name, String password);

}
